﻿//------------------------------------------------------------------------------------------------- 
// <copyright file="WebPropertyInfo.cs" company="">
// Copyright (c) Collaboris .  All rights reserved.
// </copyright>
//-------------------------------------------------------------------------------------------------
namespace Collaboris.SharePoint.Wss.Webs
{
    using System;
    using System.Xml.Serialization;

    using Entities;

    /// <summary>
    /// Defines a set of Properties to set
    /// at the SPWeb.
    /// </summary>
    [Serializable]
    public class WebPropertyInfo : WSSEntityBase
    {
        #region Fields (3) 

        private string siteMasterPageUrl;
        private string systemMasterPageUrl;
        private bool? noCrawl;

        private bool applyToSubSites;
        private string siteUrl;

        #endregion Fields 

        #region Constructors (1) 

        public WebPropertyInfo() 
        {  }

        #endregion Constructors 

        #region Properties (3)

        private bool? treeViewEnabled;

        /// <summary>
        /// Gets or sets a Boolean value that specifies 
        /// whether the Windows SharePoint Services TreeView 
        /// is enabled in the left navigational area of Web site pages. 
        /// </summary>
        [XmlElement(IsNullable = true)]
        public bool? TreeViewEnabled 
        {
            get
            {
                return this.treeViewEnabled;
            }
            set
            {
                this.treeViewEnabled = value;
            }
        }

        private string title = null;

        /// <summary>
        /// Gets or sets the title for the Web site.
        /// </summary>
        public string Title 
        {
            get
            {
                return this.title;
            }
            set
            {
                this.title = value;
            }
        }

        private bool? syndicationEnabled;

        /// <summary>
        /// Gets or sets a Boolean value that specifies 
        /// whether syndication is enabled in the Web site. 
        /// </summary>
        [XmlElement(IsNullable = true)]
        public bool? SyndicationEnabled
        {
            get
            {
                return this.syndicationEnabled;
            }
            set
            {
                this.syndicationEnabled = value;
            }
        }

        private string siteLogoUrl = null;

        /// <summary>
        /// Gets or sets the server-relative URL of the Web site logo.
        /// </summary>
        public string SiteLogoUrl 
        {
            get
            {
                return this.siteLogoUrl;
            }
            set
            {
                this.siteLogoUrl = value;
            }
        }

        private string siteLogoDescription = null;

        /// <summary>
        /// Gets or sets the description of the Web site logo.
        /// </summary>
        public string SiteLogoDescription 
        {
            get
            {
                return this.siteLogoDescription;
            }
            set
            {
                this.siteLogoDescription = value;
            }
        }

        private string serverRelativeUrl = null;

        /// <summary>
        /// Gets or sets the server-relative URL for the Web site.
        /// </summary>
        public string ServerRelativeUrl 
        {
            get
            {
                return this.serverRelativeUrl;
            }
            set
            {
                this.serverRelativeUrl = value;
            }
        }


        private string requestAccessEmail = null;

        /// <summary>
        /// Gets or sets the e-mail address to which 
        /// requests for access are sent. 
        /// </summary>
        public string RequestAccessEmail 
        {
            get
            {
                return this.requestAccessEmail;
            }
            set
            {
                this.requestAccessEmail = value;
            }
        }

        private bool? quickLaunchEnabled;

        /// <summary>
        /// Gets or sets a Boolean value that specifies 
        /// whether the Quick Launch area is enabled on 
        /// the Web site.
        /// </summary>
        [XmlElement(IsNullable = true)]
        public bool? QuickLaunchEnabled 
        {
            get
            {
                return this.quickLaunchEnabled;
            }
            set
            {
                this.quickLaunchEnabled = value;
            }
        }

        public bool? parserEnabled;
        
        /// <summary>
        /// Gets or sets a Boolean value that specifies 
        /// whether parsing is enabled for the Web site
        /// </summary>
        /// <value>The master page URL.</value>
        [XmlElement(IsNullable = true)]
        public bool? ParserEnabled
        {
            get
            {
                return this.parserEnabled;
            }
            set
            {
                this.parserEnabled = value;
            }
        }



        /// <summary>
        /// Gets or sets the "System" Master page URL.
        /// </summary>
        /// <value>The master page URL.</value>
        [XmlElement(IsNullable = true)]
        public bool? NoCrawl
        {
            get
            {
                return this.noCrawl;
            }
            set
            {
                this.noCrawl = value;
            }
        }

        private string name = null;

        /// <summary>
        /// Gets or sets the name of the Web site. 
        /// </summary>
        public string Name
        {
            get
            {
                return this.name;
            }
            set
            {
                this.name = value;
            }
        }

        private string description = null;

        /// <summary>
        /// Gets or sets the description for the site.
        /// </summary>
        public string Description
        {
            get
            {
                return this.description;
            }
            set
            {
                this.description = value;
            }
        }


        private string alternateHeader = null;

        /// <summary>
        /// Gets or sets the URL for an alternate .aspx page 
        /// that will be used to render the top navigation area 
        /// in Windows SharePoint Services pages.
        /// </summary>
        public string AlternateHeader 
        {
            get
            {
                return this.alternateHeader;
            }
            set
            {
                this.alternateHeader = value;
            }
        }

        private string alternateCssUrl = null;

        /// <summary>
        /// Gets or sets the URL for an alternate cascading 
        /// style sheet (CSS) to use in the Web site.
        /// </summary>
        public string AlternateCssUrl 
        {
            get
            {
                return this.alternateCssUrl;
            }
            set
            {
                this.alternateCssUrl = value;
            }
        }

        private bool? allowAutomaticASPXPageIndexing;

        /// <summary>
        /// Gets or sets a Boolean value that specifies whether 
        /// the .aspx page within the Web site should be indexed 
        /// by the search engine.
        /// </summary>
        [XmlElement(IsNullable = true)]
        public bool? AllowAutomaticASPXPageIndexing
        {
            get
            {
                return this.allowAutomaticASPXPageIndexing;
            }
            set
            {
                this.allowAutomaticASPXPageIndexing = value;
            }
        }


    

        /// <summary>
        /// Gets or sets the "Site" master page URL.
        /// </summary>
        /// <value>The master page URL.</value>
        [XmlAttribute]
        public string SiteMasterPageUrl
        {
            get
            {
                return this.siteMasterPageUrl;
            }
            set
            {
                this.siteMasterPageUrl = value;
            }
        }

        /// <summary>
        /// Gets or sets the "System" Master page URL.
        /// </summary>
        /// <value>The master page URL.</value>
        [XmlAttribute]
        public string SystemMasterPageUrl
        {
            get
            {
                return this.systemMasterPageUrl;
            }
            set
            {
                this.systemMasterPageUrl = value;
            }
        }

        /// <summary>
        /// Gets or sets a value defining whether to replace the master
        /// page on all the sub sites.
        /// </summary>
        /// <remarks>
        /// NOTE! This will only include those sites that already
        /// inherit from the current Master Page.
        /// </remarks>
        /// <value><c>true</c> if [reset sub sites]; otherwise, <c>false</c>.</value>
        [XmlAttribute]
        public bool ApplyToSubSites
        {
            get
            {
                return this.applyToSubSites;
            }
            set
            {
                this.applyToSubSites = value;
            }
        }

        /// <summary>
        /// The Relative Url to the Site
        /// </summary>
        /// <example>
        /// /sports
        /// /sports/site1
        /// </example>
        [XmlAttribute]
        public string SiteUrl  
        {
            get
            {
                return this.siteUrl;
            }
            set
            {
                this.siteUrl = value;
            }
        }

        #endregion Properties 
    }
}